<template>
  <div>
    <el-card class="box-card" shadow="never">
      <div slot="header" class="header">
        <div class="header-text">友情链接</div>
      </div>
      <div class="link-container">
        <el-link
          v-for="(item, i) in linkList"
          :key="i"
          type="primary"
          class="link"
          :underline="false"
          :href="item.linkUrl"
        >
          {{ item.linkName }}
        </el-link>
      </div>
    </el-card>
  </div>
</template>

<script>
import { list } from '@/api/link'

export default {
  data() {
    return {
      linkList: []
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList() {
      list().then((res) => {
        this.linkList = res.data
      })
    }
  }
}
</script>

<style src="./link.css" scoped>
</style>
